package com.rtp.transformer.parser.util;

import com.rtp.transformer.parser.Configuration;
import com.rtp.transformer.parser.FormatFactory;
import com.rtp.transformer.parser.TXTOutAndInStream;

public class FormatUtil {
	private static final FormatFactory ff;
	 
	 static{
		 try {
	        	// TODO parametrize and make configurable ?
	            // Create the SessionFactory
	            ff = new Configuration("format-test.cfg.xml").buildFactory();
	        } catch (Throwable ex) {
	           
	            throw new ExceptionInInitializerError(ex);
	        }
	 }
	 
	 public static TXTOutAndInStream getOutInStream(String key){
		 return ff.getOutInStream(key);
	 }
}
